#include "snakenode.h"
#include <QDebug>
SnakeNode::SnakeNode(int x, int y, QObject *parent) : QObject(parent)
{
    this->x = x;
    this->y = y;
}
SnakeNode::~SnakeNode(){
    //qDebug() << "析构snake" << "\n";
}
//设置x坐标
void SnakeNode::setX(int x){
    this->x = x;
}
//获取x坐标
 int SnakeNode::getX(){
    return x;
}
//设置y坐标
void SnakeNode::setY(int y){
    this->y = y;
}
//获取y坐标
int SnakeNode::getY(){
    return y;
}
